home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Speccy ClassiX 1998
/
Speccy ClassiX 98.iso
/
amiga_system
/
the_aminet
/
dev
/
lang
/
python_src.readme
< prev
next >
Wrap
Text File
|
1995-11-09
|
18KB
|
357 lines
Short: Amiga Python source files
Author: Guido van Rossum (Amiga port: Geoff Fellows)
Uploader: "Geoff Fellows" <gfellows@csu.edu.au>
Version: 0.0 initial release
Type: dev/lang
This is an Amiga port of the programming lanugage Python.
It's only a straight port based on the POSIX version of Python v1.3,
there are no Amiga-specifics yet. There is one serious problem:
floating-point numbers don't print properly, they work internally, but
print as "%.12g". I've used SAS/C v6.55 and v6.51 and a variety of
optimisations and floating-point types, even tried stepping through
the code with cpr, but floating-point numbers always display as
"%.12g"! This string isn't in the executable because I changed to
gcvt().
Follows is the contents of the BLURB file.
The prime number program works well.
What is Python?
---------------
Python is an interpreted, interactive, object-oriented programming
language. It incorporates modules, exceptions, dynamic typing, very
high level dynamic data types, and classes. Python combines
remarkable power with very clear syntax. It has interfaces to many
system calls and libraries, as well as to various window systems, and
is extensible in C or C++. It is also usable as an extension language
for applications that need a programmable interface. Finally, Python
is portable: it runs on many brands of UNIX, on the Mac, and on
MS-DOS.
As a short example of what Python looks like, here's a script to
print prime numbers (not blazingly fast, but readable!). When this
file is made executable, it is callable directly from the UNIX shell
(if your system supports #! in scripts and the python interpreter is
installed at the indicated place).
#!/usr/local/bin/python
# Print prime numbers in a given range
def main():
import sys
min, max = 2, 0x7fffffff
if sys.argv[1:]:
min = int(eval(sys.argv[1]))
if sys.argv[2:]:
max = int(eval(sys.argv[2]))
primes(min, max)
def primes(min, max):
if 2 >= min: print 2
primes = [2]
i = 3
while i <= max:
for p in primes:
if i%p == 0 or p*p > i: break
if i%p <> 0:
primes.append(i)
if i >= min: print i
i = i+2
main()
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
4621 1931 58.2% 22-Oct-95 12:54:38 +opcode.h
1705 859 49.6% 22-Oct-95 12:54:38 +parsetok.h
25 25 0.0% 22-Oct-95 12:54:38 +patchlevel.h
1736 876 49.5% 22-Oct-95 12:54:38 +pgenheaders.h
2268 957 57.8% 22-Oct-95 12:54:38 +pythonrun.h
1689 880 47.8% 22-Oct-95 12:54:38 +rangeobject.h
15265 4474 70.6% 22-Oct-95 12:54:38 +rename2.h
2910 1325 54.4% 22-Oct-95 12:54:38 +stringobject.h
3112 1502 51.7% 22-Oct-95 12:54:38 +structmember.h
1696 843 50.2% 22-Oct-95 12:54:38 +sysmodule.h
1088 396 63.6% 22-Oct-95 12:54:38 +thread.h
2533 1195 52.8% 22-Oct-95 12:54:38 +token.h
2804 1269 54.7% 22-Oct-95 12:54:38 +tupleobject.h
2466 991 59.8% 22-Oct-95 12:54:38 +mappingobject.h
1806 835 53.7% 22-Oct-95 12:54:38 +marshal.h
1480 746 49.5% 22-Oct-95 12:54:38 +metagrammar.h
2508 1089 56.5% 22-Oct-95 12:54:38 +methodobject.h
1683 834 50.4% 22-Oct-95 12:54:38 +moduleobject.h
2641 1199 54.6% 22-Oct-95 12:54:38 +mymalloc.h
470 285 39.3% 22-Oct-95 12:54:38 +mymath.h
1555 770 50.4% 22-Oct-95 12:54:38 +myproto.h
2457 1147 53.3% 22-Oct-95 12:54:38 +myselect.h
1676 797 52.4% 22-Oct-95 12:54:38 +mytime.h
15621 5420 65.3% 22-Oct-95 12:54:38 +object.h
2481 1180 52.4% 22-Oct-95 12:54:38 +objimpl.h
1894 937 50.5% 22-Oct-95 12:54:38 +osdefs.h.in
1892 896 52.6% 22-Oct-95 12:54:38 +fileobject.h
1853 939 49.3% 22-Oct-95 12:54:38 +floatobject.h
3870 1612 58.3% 22-Oct-95 12:54:38 +frameobject.h
2017 905 55.1% 22-Oct-95 12:54:38 +funcobject.h
1189 402 66.1% 22-Oct-95 12:54:38 +graminit.h
3322 1405 57.7% 22-Oct-95 12:54:38 +grammar.h
1849 878 52.5% 22-Oct-95 12:54:38 +import.h
2945 1401 52.4% 22-Oct-95 12:54:38 +intobject.h
1474 749 49.1% 22-Oct-95 12:54:38 +intrcheck.h
2929 1251 57.2% 22-Oct-95 12:54:38 +listobject.h
2937 1482 49.5% 22-Oct-95 12:54:38 +longintrepr.h
1884 919 51.2% 22-Oct-95 12:54:38 +longobject.h
2171 1076 50.4% 22-Oct-95 12:54:38 +node.h
24457 5907 75.8% 22-Oct-95 12:54:38 +abstract.h
2318 1023 55.8% 22-Oct-95 12:54:38 +accessobject.h
1632 827 49.3% 22-Oct-95 12:54:38 +assert.h
2074 976 52.9% 22-Oct-95 12:54:38 +bitset.h
1502 765 49.0% 22-Oct-95 12:54:38 +bltinmodule.h
3784 1576 58.3% 22-Oct-95 12:54:38 +ceval.h
2064 914 55.7% 22-Oct-95 12:54:38 +cgensupport.h
2868 1162 59.4% 22-Oct-95 12:54:38 +classobject.h
1454 755 48.0% 22-Oct-95 12:54:38 +dictobject.h
2108 1068 49.3% 22-Oct-95 12:54:38 +errcode.h
3035 1083 64.3% 22-Oct-95 12:54:38 +errors.h
1477 765 48.2% 22-Oct-95 12:54:38 +eval.h
122 109 10.6% 22-Oct-95 12:54:38 +Python.h
3182 1449 54.4% 22-Oct-95 13:40:12 +allobjects.h
2612 1256 51.9% 22-Oct-95 13:18:56 +compile.h
286 161 43.7% 22-Oct-95 12:54:38 +Makefile
2727 1288 52.7% 22-Oct-95 13:25:32 +modsupport.h
1956 944 51.7% 17-Oct-95 22:18:42 +osdefs.h
1847 906 50.9% 22-Oct-95 13:16:12 +traceback.h
3168 975 69.2% 22-Oct-95 14:54:32 +traceback.py
1040 480 53.8% 22-Oct-95 14:54:32 +types.py
2318 872 62.3% 22-Oct-95 14:54:32 +tzparse.py
649 363 44.0% 22-Oct-95 14:54:32 +util.py
4637 1931 58.3% 22-Oct-95 14:54:32 +uu.py
16820 4161 75.2% 22-Oct-95 14:54:32 +wave.py
6577 2386 63.7% 22-Oct-95 14:54:32 +whatsound.py
2477 1073 56.6% 22-Oct-95 14:54:32 +whrandom.py
2200 1022 53.5% 22-Oct-95 14:54:32 +zmod.py
2708 788 70.9% 22-Oct-95 14:54:32 +test_pow.py
1117 454 59.3% 22-Oct-95 14:54:32 +test_rgbimg.py
500 280 44.0% 22-Oct-95 14:54:32 +test_select.py
910 433 52.4% 22-Oct-95 14:54:32 +test_signal.py
869 455 47.6% 22-Oct-95 14:54:32 +test_support.py
2347 778 66.8% 22-Oct-95 14:54:32 +test_thread.py
7655 1929 74.8% 22-Oct-95 14:54:32 +test_types.py
1698 844 50.2% 22-Oct-95 14:54:32 +testall.out
714 283 60.3% 22-Oct-95 14:54:32 +testall.py
2697 1079 59.9% 22-Oct-95 14:54:32 +toaiff.py
679 412 39.3% 22-Oct-95 14:54:32 +token.py
1956 1002 48.7% 22-Oct-95 14:54:32 +tokenize.py
1219 593 51.3% 22-Oct-95 14:54:32 +tempfile.py
2412 1134 52.9% 22-Oct-95 14:54:32 +autotest.py
4392 1079 75.4% 22-Oct-95 14:54:32 +test_audioop.py
9475 2424 74.4% 22-Oct-95 14:54:32 +test_b1.py
8920 2121 76.2% 22-Oct-95 14:54:32 +test_b2.py
207 113 45.4% 22-Oct-95 14:54:32 +test_builtin.py
1422 615 56.7% 22-Oct-95 14:54:32 +test_exceptions.py
10786 3575 66.8% 22-Oct-95 14:54:32 +test_grammar.py
590 283 52.0% 22-Oct-95 14:54:32 +test_md5.py
914 343 62.4% 22-Oct-95 14:54:32 +test_opcodes.py
106 89 16.0% 22-Oct-95 14:54:32 +test_operations.py
1698 844 50.2% 23-Oct-95 09:51:06 +testall.out.in
6378 2441 61.7% 22-Oct-95 14:54:32 +random.py
1575 706 55.1% 22-Oct-95 14:54:32 +regex_syntax.py
706 358 49.2% 22-Oct-95 14:54:32 +regexp.py
3981 1541 61.2% 22-Oct-95 14:54:32 +regsub.py
2576 835 67.5% 22-Oct-95 14:54:32 +repr.py
8487 2884 66.0% 22-Oct-95 14:54:32 +rexec.py
3741 1564 58.1% 22-Oct-95 14:54:32 +sched.py
8930 3008 66.3% 22-Oct-95 14:54:32 +sgmllib.py
3673 1206 67.1% 22-Oct-95 14:54:32 +shelve.py
1657 695 58.0% 22-Oct-95 14:54:32 +shutil.py
6577 2386 63.7% 22-Oct-95 14:54:32 +sndhdr.py
1708 730 57.2% 22-Oct-95 14:54:32 +stat.py
1723 681 60.4% 22-Oct-95 14:54:32 +statcache.py
6627 2259 65.9% 22-Oct-95 14:54:32 +string.py
968 465 51.9% 22-Oct-95 14:54:32 +symbol.py
4147 1461 64.7% 22-Oct-95 14:54:32 +tb.py
2664 894 66.4% 22-Oct-95 14:54:32 +packmail.py
5829 2207 62.1% 22-Oct-95 14:54:32 +pdb.doc
12296 3894 68.3% 22-Oct-95 14:54:32 +pdb.py
15038 5186 65.5% 22-Oct-95 14:54:32 +pickle.py
8780 2969 66.1% 22-Oct-95 14:54:32 +pipes.py
1286 630 51.0% 22-Oct-95 14:54:32 +poly.py
5297 1852 65.0% 22-Oct-95 14:54:32 +posixfile.py
7312 2880 60.6% 22-Oct-95 14:54:32 +posixpath.py
28408 10510 63.0% 22-Oct-95 14:54:32 +profile.doc
20334 7099 65.0% 22-Oct-95 14:54:32 +profile.py
16336 5348 67.2% 22-Oct-95 14:54:32 +pstats.py
2740 1226 55.2% 22-Oct-95 14:54:32 +pty.py
841 444 47.2% 22-Oct-95 14:54:32 +py_compile.py
6070 2231 63.2% 22-Oct-95 14:54:32 +pyclbr.py
2865 1148 59.9% 22-Oct-95 14:54:32 +quopri.py
276 177 35.8% 22-Oct-95 14:54:32 +rand.py
7217 1859 74.2% 22-Oct-95 14:54:32 +formatter.py
4074 1479 63.6% 22-Oct-95 14:54:32 +fpformat.py
1778 780 56.1% 22-Oct-95 14:54:32 +getopt.py
1070 402 62.4% 22-Oct-95 14:54:32 +glob.py
1433 564 60.6% 22-Oct-95 14:54:32 +grep.py
11252 3258 71.0% 22-Oct-95 14:54:32 +ihooks.py
805 451 43.9% 22-Oct-95 14:54:32 +importall.py
2020 837 58.5% 22-Oct-95 14:54:32 +linecache.py
288 154 46.5% 22-Oct-95 14:54:32 +lockfile.py
3170 1206 61.9% 22-Oct-95 14:54:32 +multifile.py
1545 647 58.1% 22-Oct-95 14:54:32 +mutex.py
1552 604 61.0% 22-Oct-95 14:54:32 +newdir.py
12374 4066 67.1% 22-Oct-95 14:54:32 +ni.py
3136 1289 58.8% 22-Oct-95 14:54:32 +os.py
68 63 7.3% 22-Oct-95 14:54:32 +ospath.py
2090 880 57.8% 22-Oct-95 14:54:32 +cmd.py
1757 835 52.4% 22-Oct-95 14:54:32 +cmp.py
1885 903 52.0% 22-Oct-95 14:54:32 +cmpcache.py
2136 960 55.0% 22-Oct-95 14:54:32 +codehack.py
3082 1164 62.2% 22-Oct-95 14:54:32 +colorsys.py
1393 698 49.8% 22-Oct-95 14:54:32 +commands.py
1874 820 56.2% 22-Oct-95 14:54:32 +compileall.py
6351 2007 68.3% 22-Oct-95 14:54:32 +copy.py
823 416 49.4% 22-Oct-95 14:54:32 +dircache.py
5071 1761 65.2% 22-Oct-95 14:54:32 +dircmp.py
4664 1628 65.0% 22-Oct-95 14:54:32 +dis.py
3484 1239 64.4% 22-Oct-95 14:54:32 +dumbdbm.py
1608 730 54.6% 22-Oct-95 14:54:32 +dump.py
590 271 54.0% 22-Oct-95 14:54:32 +find.py
15087 4507 70.1% 22-Oct-95 14:54:32 +fmt.py
2207 904 59.0% 22-Oct-95 14:54:32 +fnmatch.py
2346 1072 54.3% 22-Oct-95 14:54:32 +addpack.py
29617 7897 73.3% 22-Oct-95 14:54:32 +aifc.py
1426 717 49.7% 22-Oct-95 14:54:32 +anydbm.py
1654 759 54.1% 22-Oct-95 14:54:32 +base64.py
9455 2600 72.5% 22-Oct-95 14:54:32 +bdb.py
12118 3999 66.9% 22-Oct-95 14:54:32 +binhex.py
458 205 55.2% 22-Oct-95 14:54:32 +bisect.py
4442 1811 59.2% 22-Oct-95 14:54:32 +calendar.py
7426 2510 66.1% 22-Oct-95 14:54:32 +Complex.py
286 161 43.7% 22-Oct-95 14:54:32 +Makefile
2981 902 69.7% 22-Oct-95 14:54:32 +Queue.py
3536 1328 62.4% 22-Oct-95 14:54:32 +StringIO.py
689 261 62.1% 22-Oct-95 14:54:32 +UserDict.py
1270 396 68.8% 22-Oct-95 14:54:32 +UserList.py
3054 1158 62.0% 22-Oct-95 12:54:40 +soundex.c
6506 2734 57.9% 25-Oct-95 12:23:36 +main.c
32445 7959 75.4% 25-Oct-95 17:48:34 +posixmodule.c
42574 11376 73.2% 22-Oct-95 12:54:40 +regexpr.c
5616 2134 62.0% 22-Oct-95 12:54:40 +regexpr.h
20430 6099 70.1% 22-Oct-95 12:54:40 +rotormodule.c
5436 2134 60.7% 22-Oct-95 12:54:40 +selectmodule.c
12274 3576 70.8% 22-Oct-95 12:54:40 +signalmodule.c
11678 3090 73.5% 22-Oct-95 12:54:40 +stropmodule.c
7187 2487 65.3% 22-Oct-95 12:54:40 +threadmodule.c
10259 3496 65.9% 23-Oct-95 08:25:32 +timemodule.c
3376 1451 57.0% 22-Oct-95 12:54:40 +timing.h
1269 399 68.5% 22-Oct-95 12:54:40 +timingmodule.c
5066 2109 58.3% 22-Oct-95 12:54:40 +xxmodule.c
23323 5731 75.4% 22-Oct-95 12:54:40 +arraymodule.c
34213 7387 78.4% 22-Oct-95 12:54:40 +audioop.c
23561 7240 69.2% 23-Oct-95 15:46:26 +binascii.c
2784 1223 56.0% 19-Oct-95 05:14:20 +config.c
1899 977 48.5% 22-Oct-95 12:54:40 +config.c.in
519 301 42.0% 22-Oct-95 12:54:40 +cryptmodule.c
5420 2110 61.0% 22-Oct-95 12:54:40 +dlmodule.c
3271 1508 53.8% 22-Oct-95 12:54:40 +environment.c
4363 1700 61.0% 22-Oct-95 12:54:40 +newmodule.c
15855 4884 69.1% 22-Oct-95 12:54:40 +objc.c
56619 13295 76.5% 22-Oct-95 12:54:40 +parsermodule.c
13582 4046 70.2% 22-Oct-95 12:54:40 +regexmodule.c
9563 3028 68.3% 22-Oct-95 12:54:40 +structmodule.c
11875 5010 57.8% 22-Oct-95 12:54:38 +BUGS
3438 1295 62.3% 22-Oct-95 12:54:40 +fcntlmodule.c
879 468 46.7% 22-Oct-95 12:54:40 +getpath.c
5459 1983 63.6% 22-Oct-95 12:54:40 +mathmodule.c
2285 1015 55.5% 22-Oct-95 12:54:40 +md5.h
10453 3263 68.7% 22-Oct-95 12:54:40 +md5c.c
4184 1749 58.1% 22-Oct-95 12:54:40 +md5module.c
10523 4530 56.9% 22-Oct-95 12:54:40 +Setup.in
19944 5868 70.5% 22-Oct-95 12:54:42 +stringobject.c
10045 3292 67.2% 22-Oct-95 12:54:42 +tupleobject.c
2515 1154 54.1% 22-Oct-95 12:54:42 +typeobject.c
22964 9317 59.4% 22-Oct-95 12:54:42 +README
508 265 47.8% 26-Oct-95 16:15:06 +scoptions
12060 5281 56.2% 22-Oct-95 12:54:42 +TODO
15464 4478 71.0% 22-Oct-95 12:54:40 +fileobject.c
9364 3218 65.6% 22-Oct-95 12:54:40 +frameobject.c
4943 1865 62.2% 22-Oct-95 12:54:40 +funcobject.c
15577 5097 67.2% 22-Oct-95 12:54:40 +intobject.c
15011 4276 71.5% 22-Oct-95 12:54:40 +listobject.c
29678 8334 71.9% 22-Oct-95 12:54:42 +longobject.c
19393 5556 71.3% 22-Oct-95 12:54:42 +mappingobject.c
5582 2045 63.3% 22-Oct-95 12:54:42 +methodobject.c
4066 1631 59.8% 22-Oct-95 12:54:42 +moduleobject.c
12464 4318 65.3% 22-Oct-95 12:54:42 +object.c
5288 2023 61.7% 22-Oct-95 12:54:42 +rangeobject.c
3688 1657 55.0% 22-Oct-95 12:54:42 +xxobject.c-template
20974 4477 78.6% 22-Oct-95 12:54:40 +abstract.c
8047 2609 67.5% 22-Oct-95 12:54:40 +accessobject.c
28729 7188 74.9% 22-Oct-95 12:54:40 +classobject.c
10203 3831 62.4% 25-Oct-95 12:25:26 +floatobject.c
10203 3831 62.4% 25-Oct-95 12:04:52 +floatobject.c.bak
9339 3616 61.2% 22-Oct-95 12:54:42 +parser.c
2106 1030 51.0% 22-Oct-95 12:54:42 +parser.h
4193 1619 61.3% 22-Oct-95 12:54:42 +parsetok.c
15847 5089 67.8% 22-Oct-95 12:54:42 +pgen.c
4496 1977 56.0% 22-Oct-95 12:54:42 +pgenmain.c
3775 1388 63.2% 22-Oct-95 12:54:42 +printgrammar.c
15329 4914 67.9% 22-Oct-95 12:54:42 +tokenizer.c
2745 1303 52.5% 22-Oct-95 12:54:42 +tokenizer.h
4149 1907 54.0% 22-Oct-95 12:54:42 +acceler.c
2217 1038 53.1% 22-Oct-95 12:54:42 +bitset.c
3339 1499 55.1% 22-Oct-95 12:54:42 +firstsets.c
5522 2025 63.3% 22-Oct-95 12:54:42 +grammar.c
2200 1098 50.0% 22-Oct-95 12:54:42 +grammar1.c
3871 1834 52.6% 17-Oct-95 09:25:54 +intrcheck.c
2241 1042 53.5% 22-Oct-95 12:54:42 +listnode.c
3354 1196 64.3% 22-Oct-95 12:54:42 +metagrammar.c
4129 1880 54.4% 22-Oct-95 12:54:42 +myreadline.c
2459 1138 53.7% 22-Oct-95 12:54:42 +node.c
1560 803 48.5% 22-Oct-95 13:49:52 +pgen.h
5996 1775 70.3% 22-Oct-95 12:54:42 +structmember.c
7527 2703 64.0% 22-Oct-95 12:54:42 +sysmodule.c
6186 2366 61.7% 22-Oct-95 12:54:42 +traceback.c
12766 3653 71.3% 22-Oct-95 13:27:06 +getargs.c
2257 1119 50.4% 22-Oct-95 12:54:42 +getopt.c
95 87 8.4% 22-Oct-95 12:54:42 +getplatform.c
367 234 36.2% 22-Oct-95 12:54:42 +getversion.c
23773 3868 83.7% 22-Oct-95 12:54:42 +graminit.c
21291 6058 71.5% 22-Oct-95 12:54:42 +import.c
14111 5215 63.0% 22-Oct-95 12:54:42 +importdl.c
1707 862 49.5% 22-Oct-95 12:54:42 +importdl.h
11049 3537 67.9% 22-Oct-95 12:54:42 +marshal.c
1663 844 49.2% 22-Oct-95 12:54:42 +memmove.c
9546 2986 68.7% 22-Oct-95 12:54:42 +modsupport.c
4237 1929 54.4% 22-Oct-95 12:54:42 +mystrtoul.c
14945 5143 65.5% 22-Oct-95 12:54:42 +pythonrun.c
1744 928 46.7% 22-Oct-95 12:54:42 +sigcheck.c
31230 7573 75.7% 22-Oct-95 12:54:42 +bltinmodule.c
61752 16831 72.7% 22-Oct-95 12:54:42 +ceval.c
7327 1607 78.0% 22-Oct-95 12:54:42 +cgensupport.c
60472 16130 73.3% 22-Oct-95 12:54:42 +compile.c
5257 2247 57.2% 22-Oct-95 12:54:42 +errors.c
1688 906 46.3% 22-Oct-95 12:54:42 +fmod.c
591 317 46.3% 22-Oct-95 12:54:42 +frozen.c
2758 1281 53.5% 22-Oct-95 12:54:42 +frozenmain.c
274 159 41.9% 26-Oct-95 17:04:16 +getcompiler.c
275 159 42.1% 26-Oct-95 17:03:58 +getcompiler.c.bak
189 148 21.6% 22-Oct-95 12:54:42 +getcopyright.c
1586 846 46.6% 22-Oct-95 12:54:42 +getmtime.c
33333 4900 85.2% 26-Oct-95 16:33:00 +smake.list2
17445 2850 83.6% 26-Oct-95 17:00:22 +SMakefile
1334 728 45.4% 26-Jan-94 12:00:00 +BLURB
5750 2735 52.4% 26-Jan-94 12:00:00 +BLURB.LUTZ
766 473 38.2% 26-Oct-95 16:03:48 +BUGS.Amiga
22307 8818 60.4% 06-Aug-94 12:00:00 +cheatsheet
218 139 36.2% 25-Oct-95 10:24:06 +python.lnk
992 602 39.3% 26-Oct-95 16:06:44 +README.Amiga
22654 3235 85.7% 25-Oct-95 10:17:26 +smake.list
80 80 0.0% 25-Oct-95 10:23:54 +testsprintf.c
-------- ------- ----- --------- --------
1869675 605762 67.6% 28-Oct-95 13:17:10 284 files